<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>

<head>
<style type="text/css">
body {white-space: pre-wrap;}
</style>
</head>
<body><span style = "background-color: #F0F0F0;">  0</span>| <span style="color: rgb(255,0,0)">#include &#60;iostream&#62;</span>
<span style = "background-color: #F0F0F0;">  1</span>| <span style="color: rgb(255,0,0)">#include &#60;cstdio&#62;</span>
<span style = "background-color: #F0F0F0;">  2</span>| <span style="color: rgb(255,0,0)">#include &#60;string&#62;</span>
<span style = "background-color: #F0F0F0;">  3</span>| <span style="color: rgb(255,0,0)">#include &#60;vector&#62;</span>
<span style = "background-color: #F0F0F0;">  4</span>| <span style="color: rgb(255,0,0)">#include &#60;set&#62;</span>
<span style = "background-color: #F0F0F0;">  5</span>| <span style="color: rgb(255,0,0)">#include &#60;map&#62;</span>
<span style = "background-color: #F0F0F0;">  6</span>| <span style="color: rgb(255,0,0)">#include &#60;algorithm&#62;</span>
<span style = "background-color: #F0F0F0;">  7</span>| 
<span style = "background-color: #F0F0F0;">  8</span>| <span style="color: rgb(0,0,255)">using</span> <span style="color: rgb(0,0,255)">namespace</span> std;
<span style = "background-color: #F0F0F0;">  9</span>| 
<span style = "background-color: #F0F0F0;"> 10</span>| set&#60;<span style="color: rgb(0,0,255)">int</span>&#62; urep;
<span style = "background-color: #F0F0F0;"> 11</span>| map&#60;<span style="color: rgb(0,0,255)">int</span>,<span style="color: rgb(0,0,255)">int</span>&#62; rep;
<span style = "background-color: #F0F0F0;"> 12</span>| <span style="color: rgb(0,0,255)">int</span> a[100010];
<span style = "background-color: #F0F0F0;"> 13</span>| <span style="color: rgb(0,0,255)">int</span> main()
<span style = "background-color: #F0F0F0;"> 14</span>| {
<span style = "background-color: #F0F0F0;"> 15</span>| 	<span style="color: rgb(0,0,255)">int</span> n,k,t;
<span style = "background-color: #F0F0F0;"> 16</span>| 	cin&#62;&#62;n&#62;&#62;k;
<span style = "background-color: #F0F0F0;"> 17</span>| 	<span style="color: rgb(0,0,255)">for</span>(<span style="color: rgb(0,0,255)">int</span> i=1;i&#60;=n;i++) scanf("%d",a+i);
<span style = "background-color: #F0F0F0;"> 18</span>| 	<span style="color: rgb(0,0,255)">for</span>(<span style="color: rgb(0,0,255)">int</span> i=1;i&#60;=n;i++)
<span style = "background-color: #F0F0F0;"> 19</span>| 	{
<span style = "background-color: #F0F0F0;"> 20</span>| 		t=a[i];
<span style = "background-color: #F0F0F0;"> 21</span>| 		<span style="color: rgb(0,0,255)">if</span>(urep.find(t)==urep.end())
<span style = "background-color: #F0F0F0;"> 22</span>| 		{
<span style = "background-color: #F0F0F0;"> 23</span>| 			<span style="color: rgb(0,0,255)">if</span>(!rep[t]) urep.insert(t);
<span style = "background-color: #F0F0F0;"> 24</span>| 			<span style="color: rgb(0,0,255)">else</span> rep[t]++;
<span style = "background-color: #F0F0F0;"> 25</span>| 		}
<span style = "background-color: #F0F0F0;"> 26</span>| 		<span style="color: rgb(0,0,255)">else</span>
<span style = "background-color: #F0F0F0;"> 27</span>| 		{
<span style = "background-color: #F0F0F0;"> 28</span>| 			urep.erase(t);
<span style = "background-color: #F0F0F0;"> 29</span>| 			rep[t]=1;
<span style = "background-color: #F0F0F0;"> 30</span>| 		}
<span style = "background-color: #F0F0F0;"> 31</span>| 		<span style="color: rgb(0,0,255)">if</span>(i&#62;=k)
<span style = "background-color: #F0F0F0;"> 32</span>| 		{
<span style = "background-color: #F0F0F0;"> 33</span>| 			<span style="color: rgb(0,0,255)">if</span>(urep.empty()) puts("Nothing");
<span style = "background-color: #F0F0F0;"> 34</span>| 			<span style="color: rgb(0,0,255)">else</span> printf("%d\n",*urep.rbegin());
<span style = "background-color: #F0F0F0;"> 35</span>| 			t=a[i-k+1];
<span style = "background-color: #F0F0F0;"> 36</span>| 			<span style="color: rgb(0,0,255)">if</span>(urep.find(t)!=urep.end()) urep.erase(t);
<span style = "background-color: #F0F0F0;"> 37</span>| 			<span style="color: rgb(0,0,255)">else</span>
<span style = "background-color: #F0F0F0;"> 38</span>| 			{
<span style = "background-color: #F0F0F0;"> 39</span>| 				rep[t]--;
<span style = "background-color: #F0F0F0;"> 40</span>| 				<span style="color: rgb(0,0,255)">if</span>(!rep[t]) urep.insert(t);
<span style = "background-color: #F0F0F0;"> 41</span>| 			}
<span style = "background-color: #F0F0F0;"> 42</span>| 		}
<span style = "background-color: #F0F0F0;"> 43</span>| 	}
<span style = "background-color: #F0F0F0;"> 44</span>| 	<span style="color: rgb(0,0,255)">return</span> 0;
<span style = "background-color: #F0F0F0;"> 45</span>| }
</body>
</html>
